package com.zzptc.sky.baidudemo.activities;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.zzptc.sky.baidudemo.utils.MySharedPreferences;


public class LoginActivity extends AppCompatActivity {



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        SharedPreferences sp = MySharedPreferences.getSharedPreferences();

        boolean flag = sp.getBoolean("first",false);
        if (flag){
            startActivity(new Intent(this,WelcomeActivity.class));
        }else {
            startActivity(new Intent(this,GuideActivity.class));
        }

        finish();
    }

}
